package com.juyu.reader.pc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.juyu.reader.pc.dao.BookChapterDao;
import com.juyu.reader.pc.model.BookChapter;

@Service
public class BookChapterService {
	@Autowired
	private BookChapterDao bookChapterDao;

	public List<BookChapter> findBookChapter(BookChapter bookChapter) {
		return bookChapterDao.findBookChapter(bookChapter);
	}

	public int countBookChapter(BookChapter bookChapter) {
		return bookChapterDao.countBookChapter(bookChapter);
	}

	public List<BookChapter> findBookChapterById(int chapterId) {
		return bookChapterDao.findBookChapterById(chapterId);
	}

	/**
	 * 查询该书籍最后章节
	 * 
	 * 
	 */
	public List<BookChapter> findBookChapterLatest(int bookId) {
		return bookChapterDao.findBookChapterLatest(bookId);
	}
	public List<BookChapter> findBookChapterLatestAll(int bookId) {
		return bookChapterDao.findBookChapterLatestAll(bookId);
	}
	
	public List<BookChapter> findBookChapterSimple(BookChapter bookChapter) {
		return bookChapterDao.findBookChapterSimple(bookChapter);
	}

	public int countBookChapterSimple(BookChapter bookChapter) {
		return bookChapterDao.countBookChapterSimple(bookChapter);
	}

	public List<BookChapter> findBookChapterIndex(BookChapter bookChapter) {
		return bookChapterDao.findBookChapterIndex(bookChapter);
	}
}
